From d975621d9c0a5579a9e011bcf32a85000bcac616 Mon Sep 17 00:00:00 2001 From: robertl Date: Sat, 20 Dec 2003 05:39:13 +0000 Subject: [PATCH] Be nicer in absence of a shortname. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@603 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/mapsend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gpsbabel/mapsend.c b/gpsbabel/mapsend.c index 23af6e9e0..e9e1f2ff8 100644 --- a/gpsbabel/mapsend.c +++ b/gpsbabel/mapsend.c @@ -401,7 +401,7 @@ mapsend_waypt_pr(const waypoint *waypointp) mkshort(mkshort_handle, waypointp->description) : waypointp->shortname; - c = strlen(sn); + c = sn ? strlen(sn) : 0; fwrite(&c, 1, 1, mapsend_file_out); fwrite(sn, c, 1, mapsend_file_out); @@ -496,7 +496,7 @@ mapsend_route_disp(const waypoint *waypointp) route_wp_count++; /* waypoint name */ - c = strlen(waypointp->shortname); + c = waypointp->shortname ? strlen(waypointp->shortname) : 0; fwrite(&c, 1, 1, mapsend_file_out); fwrite(waypointp->shortname, c, 1, mapsend_file_out); -- 2.30.2